<template>
  <van-sidebar v-model="active">
    <van-sidebar-item
      v-for="(item, i) in sidebars"
      :key="i"
      :title="item.name"
    />
  </van-sidebar>
</template>

<script>
export default {
  data() {
    return {
      active: 0
    };
  },
  props: {
    sidebars: {
      type: Array,
      default: () => [
        {
          name: "首页"
        },
        {
          name: "分组"
        }
      ]
    },
    onChange: {
      type: Function
    }
  }
};
</script>

<style></style>
